/**
 * @FileName ConcreteBuilder.java
 * @Package builder
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-5 下午3:47:25
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.builder;

/**
 * @author 顾博君
 * @ClassName ConcreteBuilder
 * @Date 2016-1-5 下午3:47:25
 * @Function 具体建造者
 */
public class ConcreteBuilder extends Builder {
    private Product product = new Product();

    @Override
    public void setPart1() {
        product.addPart("功能1");
        System.out.println("产品需要功能1");
    }

    @Override
    public void setPart2() {
        product.addPart("功能2");
        System.out.println("产品需要功能2");
    }

    @Override
    public void setPart3() {
        product.addPart("功能3");
        System.out.println("产品需要功能3");
    }

    @Override
    public Product builderProduct() {
        System.out.println("建造者建造产品");
        return product;
    }
}
